package com.lrm.bean;

import com.lrm.pojo.Comment;
import com.lrm.pojo.Tag;
import com.lrm.pojo.Type;
import com.lrm.pojo.User;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author: 王金海
 * @Description:
 * @Date: Created by Administrator on 2017/12/4.
 * @Modified By:
 */
public class BlogBean {
    private Long id;
    private String title;
    private String content;
    //    首图
    private String firstPic;
    //  标记
    private String flag;
    //  浏览次数
    private Integer views;
    //  赞善是否开启
    private boolean appreciation;
    //  转载声明是否开启
    private boolean sharsStatement;
    //  评论是否开启
    private boolean commeatabled;
    //  是否发布
    private boolean published;
    //    是否推荐
    private boolean recommend;
    //  创建时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;
    //    更新时间
    @Temporal(TemporalType.TIMESTAMP)
    private Date updataTime;
    private Type type;
    private List<Tag> tags=new ArrayList<>();
    private User user;
    private List<Comment> comments =new ArrayList<>();

    public BlogBean() {
    }

    public BlogBean(Long id, String title, String content, String firstPic, String flag, Integer views, boolean appreciation, boolean sharsStatement, boolean commeatabled, boolean published, boolean recommend, Date createTime, Date updataTime, Type type, List<Tag> tags, User user, List<Comment> comments) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.firstPic = firstPic;
        this.flag = flag;
        this.views = views;
        this.appreciation = appreciation;
        this.sharsStatement = sharsStatement;
        this.commeatabled = commeatabled;
        this.published = published;
        this.recommend = recommend;
        this.createTime = createTime;
        this.updataTime = updataTime;
        this.type = type;
        this.tags = tags;
        this.user = user;
        this.comments = comments;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getFirstPic() {
        return firstPic;
    }

    public void setFirstPic(String firstPic) {
        this.firstPic = firstPic;
    }

    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    public Integer getViews() {
        return views;
    }

    public void setViews(Integer views) {
        this.views = views;
    }

    public boolean isAppreciation() {
        return appreciation;
    }

    public void setAppreciation(boolean appreciation) {
        this.appreciation = appreciation;
    }

    public boolean isSharsStatement() {
        return sharsStatement;
    }

    public void setSharsStatement(boolean sharsStatement) {
        this.sharsStatement = sharsStatement;
    }

    public boolean isCommeatabled() {
        return commeatabled;
    }

    public void setCommeatabled(boolean commeatabled) {
        this.commeatabled = commeatabled;
    }

    public boolean isPublished() {
        return published;
    }

    public void setPublished(boolean published) {
        this.published = published;
    }

    public boolean isRecommend() {
        return recommend;
    }

    public void setRecommend(boolean recommend) {
        this.recommend = recommend;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdataTime() {
        return updataTime;
    }

    public void setUpdataTime(Date updataTime) {
        this.updataTime = updataTime;
    }

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    public List<Tag> getTags() {
        return tags;
    }

    public void setTags(List<Tag> tags) {
        this.tags = tags;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }
}
